package com.mvp.shq.washer.ui.shop.order.orderpay;

import com.mvp.shq.washer.base.BaseModel;
import com.mvp.shq.washer.base.BasePresenter;
import com.mvp.shq.washer.base.BaseView;
import com.mvp.shq.washer.entity.result.AlipayResult;
import com.mvp.shq.washer.entity.result.BaseResult;
import com.mvp.shq.washer.entity.result.WxPayResult;
import com.mvp.shq.washer.entity.shop.TotalOrderData;
import com.mvp.shq.washer.entity.shop.result.OrderDataListResult;
import com.mvp.shq.washer.entity.shop.result.OrderDataResult;
import com.mvp.shq.washer.entity.shop.result.ShopAliPayResult;

import io.reactivex.Observable;


/**
 * Created by westing on 2017/10/11.
 */

public interface OrderPayConstract {
    interface View extends BaseView{
        void alipayS(ShopAliPayResult result);
        void wxPayS(WxPayResult result);
        void createOrder(OrderDataResult orderResult);
        void getOrderInfoS(OrderDataListResult result);
    }
    interface Model extends BaseModel{
        Observable<BaseResult<ShopAliPayResult>> getAlipayResult(String token, String orderNo, String payType);
        Observable<BaseResult<WxPayResult>> getWxResult(String token, String orderNo, String payType);
        Observable<BaseResult<OrderDataResult>> createOrder(String token, TotalOrderData ecTotalOrderDto);
        Observable<BaseResult<OrderDataListResult>> getOrderInfo(String token,String userId,String orderId);
    }
    abstract class Presenter extends BasePresenter<Model,View>{
        abstract void alipay(String orderNo);
        abstract void wxPay(String orderNo);
        abstract void createOrder(OrderDataListResult result);
        abstract void getOrderInfo(String orderId);
    }
}
